package com.moji.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.moji.common.base.PageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 部门设置
 * </p>
 *
 * @author ccl
 * @since 2024-07-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SysDept对象", description="部门设置")
public class SysDept extends PageEntity {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "代码（部门、机构、园区）")
    private String deptCode;

    @ApiModelProperty(value = "名称（部门、机构、园区）")
    private String deptName;

    @ApiModelProperty(value = "负责人")
    private String deptManager;

    @ApiModelProperty(value = "备注")
    private String deptRemark;

    @ApiModelProperty(value = "叶子节点0：部门组，1：部门明细")
    private Integer deptIsleaf;

    @ApiModelProperty(value = "等级")
    private Integer deptLevel;

    @ApiModelProperty(value = "部门类型：0-办事处，1-部门，2-组")
    private Integer deptType;

    @ApiModelProperty(value = "父代码")
    private String parentCode;

    @ApiModelProperty(value = "父名称")
    private String parentName;

    @ApiModelProperty(value = "部门全称")
    private String deptAllName;

    @ApiModelProperty(value = "机构全路径")
    private String deptPath;

    @ApiModelProperty(value = "督导人")
    private String prDeptSupervisor;

    @ApiModelProperty(value = "状态1：启用0：停用")
    private Integer prOnoff;

    @ApiModelProperty(value = "启停日期")
    private Date prOnoffTime;

    @ApiModelProperty(value = "排序：值越小排序越靠前，建议模块间采用冯100跳，方便后续模块插入，如：模块1，值100，模块2值200")
    private Integer orderNo;

    @ApiModelProperty(value = "地址")
    private String address;

    @ApiModelProperty(value = "详细地址")
    private String detailAddress;

    @ApiModelProperty(value = "联系人")
    private String linkMan;

    @ApiModelProperty(value = "联系电话")
    private String linkPhone;

    @ApiModelProperty(value = "操作人id")
    private String updateId;

    @ApiModelProperty(value = "创建人id")
    private String createId;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "备用字段1")
    private Integer spareInt1;

    @ApiModelProperty(value = "备用字段2")
    private Integer spareInt2;

    @ApiModelProperty(value = "备用字段1")
    private String spareString1;

    @ApiModelProperty(value = "备用字段2")
    private String spareString2;


    /**
     * 根据部门code查询子部门
     */
    @ApiModelProperty(value = "根据部门code查询子部门")
    @TableField(exist = false)
    private String code;

//    @Override
//    protected Serializable pkVal() {
//        return this.id;
//    }

}
